1. Field of the Invention
The invention relates to computer systems generally and more specifically to techniques used at the application program level of the system for modifying the effects of calls made to the operating system.
2. Description of the Prior Art
Computer systems are layered. In a typical system, the layers include a bottom layer of hardware: the processors, the memories, the mass storage devices, and the communications media which link these components. The next layer is the operating system. The operating system controls the operation of the hardware and defines a set of logical devices. Operations on the logical devices become operations in the hardware controlled by the operating system. The logical devices provided by the operating system are used by programs in layers above the operating system. These layers are termed the user level of the system.
An important issue in the design of computer systems is the level at which operations performed by the system are defined. For example, an operating system may provide a rich set of logical devices to the application program level, or it may provide a smaller set of primitive logical devices and expect the users' applications programs to combine the primitive devices as required to perform its operations. The same is the case with the hardware. The design trade off at each level is the same: the rich set of logical devices simplifies programming at the next level, but increases the complexity of the level providing the logical devices and decreases the overall flexibility of the system. In particular, when complex operations are performed at lower layers of the system, they are necessarily done without the benefit of information available at the higher layers. The design issue just outlined in discussed in detail in J. H. Saltzer, D. P. Reed, and D. D. Clark, "End-to-End Arguments in System Design", ACM Transactions on Computer Systems, Vol. 2, No. 4, Nov. 1984, pp. 277-288.
An example of the tradeoffs is provided by the design of backup file systems. A backup file system provides a backup of part or all of another file system. Since it is the system which is being backed up, the backup file system preserves not only file contents, but also the name by which the file is known within the portion of the system being backed up. There are many situations where it is desirable that an operation performed on a file be duplicated on a file in a backup file system. When a backup file system exists, there is no information loss if the original file system is destroyed or becomes inoperable. Further, since the backup system preserves names as well as contents, the backup file system is available for immediate use by a program which used the failed file system. It is of course always possible for an application program to create its own backup file system; however the preferred solutions to the backup file system problem have always been those which could make backups without modification.
FIG. 1 shows prior-art approaches to the design of backup file systems. In multiprocess computer systems, the file system performs operations on files in response to operations specified by programs which run in application processes. The file system itself is implemented using at least one operating system process and hardware such as disk drives. The relationship between the application process and the operating system process is that of client and server: the application process requests that the server process perform an operation and return the result of the operation to the application process. Thus, in system 101, application process 103 requests that kernel server 113 perform file operations 109, and kernel server 109 performs the operations and returns results 111. Kernel server 109 of course performs the operations by modifying data in disk drive 117. The interface between disk drive 117 and kernel server 113 is a component of kernel server 113 termed a driver 115 which is specific to a given type of disk drive 115.
In the prior art, backup file systems have been implemented at hardware level 109 and at operating system level 107. System 101 of FIG. 1 is implemented at hardware level 109. Disk drive 117 appears to server 113 as an ordinary disk drive; however, it contains mirrored disks 119(a) and 119(b); each file has a copy on both disks, and any operation which alters the file is performed on the copy on each disk. Each disk thus contains a copy of the file system. If one of the disks fails, the file system on the other disk is still available. A particular drawback of system 101 is of course the fact that special hardware is required.
Backup file systems 121 and 123 are implemented at the operating system level. System 121 has two non-mirrored disks 123(a) and 123(b); each disk 123 has a separate driver 115(a) and 115(b). When server 113 performs a file operation which creates, deletes, or other modifies a file, it causes driver 115(a) to perform the operation on drive 123(a) and driver 115(b) to perform the operation on drive 123(b); there are consequently identical copies of the file system on drive 123(a) and drive 123(b). System 121 no longer requires special hardware, but it still requires a modified operating system. Further, since the modifications must be made with regard to drivers 115(a) and (b), they must be made at the lowest layer of kernel server 113.
Backup file system 123 also has two non-mirrored disks 123(a) and (b), but each is driven by separate servers 125 and 127. Server 125 performs file operations 109 on primary disk 123(a); if the file operation creates, deletes, or otherwise modifies a file, server 125 also sends a file operation message to backup server 127, which then performs the same file operation, so that there is a copy of the file system currently being used by application process 103 on both disk drive 123(a) and disk drive 123(b). File backup system 123 is typically implemented in a distributed computing system which includes a number of component computing systems 131; in such a system, application process 103, kernel server 125, and disk drive 123 are generally on one component system 131(a), while backup server 127 and disk drive 123(b) are on another component system 131(b). Like system 121, system 123 requires modification to the operating system; however, all that is required is to modify server 125 to send messages to server 127 whenever it modifies a file for application process 103. Backup server 127 responds to the messages in exactly the same way in which it responds to file operations 109 from other processes on component system 131(b).
While any of systems 101, 121, and 123 is effective in creating backup files, all of them have important drawbacks. First, they require either special hardware or modifications to the ,operating system, and consequently are not portable. If the computer system upon which these systems is to run do not have the special hardware or the special operating system, these components must be acquired; moreover, once system 101, 121, or 123 is in use, any replacement computer system must have the special hardware or special operating system.
Second, because the systems 101, 121, and 123 operate at the hardware level 109 or the operating system level 107, all files appear equal to them and they simply backup every file modified by application process 103. Backing up every file is however generally unnecessary. Analysis of files in the UNIX.RTM. operating system has shown that 50-60% of the files in the file system are temporary working files with a lifetime of less than three minutes. In many cases, most of these files do not need to be backed up, but there is no way to identify such files to kernel server 113. Of course, making unnecessary backups is a waste of both system computing resources and system storage resources.
The unnecessary backups are a special case of the general problem alluded to above: that the further from the user an operation is performed, the less information about the operation is available to the system. As shown in the case of the backups, the result is very often inefficient use of system resources.
It is thus an object of the invention to provide systems in which operations in which user information is useful are performed at the user level without modifications of the application program and in particular to provide a backup file system which operates at the user level and is therefore both portable and able to take advantage of user information about the files to be backed up.